﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using static System.String;

namespace CommLib.Web
{
    public static class StringToUrlParam
    {
        public static string ToQueryString(Dictionary<string, string> source)=> source != null ? Join("&", source.Select(kvp => $"{Uri.EscapeUriString(kvp.Key)}={Uri.EscapeUriString(kvp.Value)}").ToArray()) : null;
        
    }
}
